home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DOS Vuser Deluxe 2003 October
/
DOS Vuser Deluxe 2003 Oct - Disc 1.iso
/
SKIN
/
Compact Classic v1.1.wmz
/
compactclassic.js
< prev
next >
Wrap
Text File
|
2002-10-25
|
3KB
|
119 lines
/* Compact Classic v1.1 */
/*
⌐2000 Microsoft Corporation. All rights reserved.
*/
//<script>
//SKIN MUST INCLUDE res://wmploc/RT_TEXT/#169 as a scriptfile
var g_fExpectingSizeChange = false;
var g_fUserHasSized = false;
function OnLoad()
{
OnOpenStateChange();
OnPlayStateChange();
}
function OnURLChange()
{
if (player.URL == "")
view.title = xWMP.toolTip;
else
view.title = player.URL;
}
function SizeChange()
{
if (!g_fExpectingSizeChange)
{
g_fUserHasSized = true;
}
}
function StartPlaying()
{
stereo.backgroundImage = 'icon_stereo.bmp';
}
var g_lastImageSourceHeight=-1;
var g_lastImageSourceWidth=-1;
function SnapToSize(forceResize)
{
if (player.openState!=osMediaOpen)
{
return;
}
var isHeight = player.currentMedia.imageSourceHeight;
var isWidth = player.currentMedia.imageSourceWidth;
if (isHeight == 0)
{
view.height = 359 - 183 - 95;
}
else
{
if ( (forceResize==false) && (isHeight == g_lastImageSourceHeight) && (isWidth == g_lastImageSourceWidth))
{
return;
}
wmlogo.visible = false;
// resize to the video size
// we'll do this if we're stretch to fit and the user hasn't sized us yet,
// or if we're not stretch to fit (zoom level is set)
if ((!g_fUserHasSized && mediacenter.videoStretchToFit) || !mediacenter.videoStretchToFit)
{
var zoom = mediacenter.videoStretchToFit ? 100 : mediacenter.videoZoom;
var x = (isWidth * (zoom / 100.0));
if (x < 285)
{
x = 285;
}
var y = (isHeight * (zoom / 100.0));
g_fExpectingSizeChange = true;
view.width = x;
view.height = 359 - 183 + y - 95;
g_fExpectingSizeChange = false;
}
}
g_lastImageSourceWidth = isWidth;
g_lastImageSourceHeight= isHeight;
}
function StopPlaying()
{
stereo.backgroundImage = '';
wmlogo.visible = true;
}
function OnPlayStateChange()
{
if(player.PlayState == psUndefined ||
player.PlayState == psReady)
{
StopPlaying();
}
else if (player.PlayState == psPlaying)
{
StartPlaying();
}
}
function OnOpenStateChange()
{
if(player.OpenState == osMediaOpen)
{
SnapToSize(false);
}
}